<template>
  <div v-loading="loading" class="parentStyle">
    <el-form ref="form" :model="form" :rules="rules" label-width="120px" class="dataForm">
      <el-row>
        <el-col v-if="form.actStatus === 'W' && form.last === 'Y'" :span="12">
          <el-form-item :label="$t('事件发生日')" prop="eventDate">
            <el-date-picker
              v-model="form.eventDate"
              clearable
              style="width: 200px"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('事件发生日')"
            />
          </el-form-item>
        </el-col>
        <el-col v-if="form.actStatus === 'W' && form.last === 'Y'" :span="12">
          <el-form-item :label="$t('产权登记日')" prop="propertyRegistrationDate">
            <el-date-picker
              v-model="form.propertyRegistrationDate"
              clearable
              style="width: 200px"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('产权登记日')"
            />
          </el-form-item>
        </el-col>
        <el-col v-if="form.actStatus === 'W' && form.last === 'Y'" :span="24">
          <el-form-item :label="$t('说明备注')" prop="descriptionRemarks">
            <el-input v-model="form.descriptionRemarks" type="textarea" :placeholder="$t('说明备注')" maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('一级登记类型')" prop="levelOneRegistrationType">
            <el-select v-model="form.levelOneRegistrationType" value="" :placeholder="$t('一级登记类型')" filterable clearable disabled @change="typeOneChange(form.levelOneRegistrationType, true)">
              <el-option
                v-for="dict in levelOneRegistrationTypeOptions"
                :key="dict.dictValue"
                :label="$t(dict.dictLabel)"
                :value="dict.dictValue"
                disabled
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('二级登记类型')" prop="levelTwoRegistrationType">
            <el-select v-model="form.levelTwoRegistrationType" value="" :disabled="form.last === 'N'" :placeholder="$t('二级登记类型')" filterable clearable>
              <el-option
                v-for="dict in getTypeOneChange"
                :key="dict.dictValue"
                :label="$t(dict.dictLabel)"
                :value="dict.dictValue"
                :disabled="form.last === 'N'"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item v-if="form.last === 'N'" :label="$t('变更内容')" prop="changeInformation">
            <el-input v-model="form.changeInformation" type="textarea" :placeholder="$t('变更内容')" maxlength="1000" readonly />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金全称')" prop="fundId">
            <el-select v-model="form.fundId" :placeholder="$t('请选择')" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD' || form.last === 'N'" filterable clearable @change="queryFundInfo(form.fundId)">
              <el-option
                v-for="item in fundOptions"
                :key="item.id"
                :label="$t(item.fundName)"
                :value="item.id"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD' || form.last === 'N'"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金简称')" prop="fundAbbreviation">
            <el-input v-model="form.fundAbbreviation" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('基金简称')" maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金类型')" prop="fundType">
            <dict-select
              v-model="form.fundType"
              :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
              dictionary="property_fund_type"
              :placeholder="$t('基金类型')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('成立时间')" prop="establishTime">
            <el-date-picker
              v-model="form.establishTime"
              :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
              clearable
              style="width: 200px"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('成立时间')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('续存期限')" prop="duration">
            <el-input v-model="form.duration" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('续存期限')" maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('注册地')" prop="detailsRegistered">
            <el-input v-model="form.detailsRegistered" :placeholder="$t('注册地')" maxlength="1000" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金管理公司')" prop="fundManagementCompany">
            <el-select v-model="form.fundManagementCompany" :placeholder="$t('请选择')" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" filterable clearable>
              <el-option
                v-for="item in propertyCompanyOptions"
                :key="item.id"
                :label="$t(item.companyId)"
                :value="item.id"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('管理公司占股比例(%)')" prop="managementCompanyRatio">
            <Ratio
              v-model="form.managementCompanyRatio"
              :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
              :precision="4"
              :controls="false"
              :min="0"
              :max="100"
              :placeholder="$t('管理公司占股比例(%)')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('管理费比例(%)')" prop="managementAmountRatio">
            <Ratio
              v-model="form.managementAmountRatio"
              :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
              :precision="4"
              :controls="false"
              :min="0"
              :max="100"
              :placeholder="$t('管理费比例(%)')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('集团派出人数')" prop="groupDischargePeopleNumber">
            <el-input-number v-model="form.groupDischargePeopleNumber" :placeholder="$t('集团派出人数')" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" :precision="0" :max="1000000000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('合伙人代表/董事长')" prop="chairman">
            <el-input v-model="form.chairman" :placeholder="$t('合伙人代表/董事长')" maxlength="100" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('是否实际管理')" prop="actuallyManaged">
            <el-radio-group v-model="form.actuallyManaged" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'">
              <el-radio
                v-for="dict in yesNoOptions"
                :key="dict.dictValue"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'"
                :label="dict.dictValue"
              >{{ $t(dict.dictLabel) }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('投委会人数')" prop="investmentCommitteePeopleNumber">
            <el-input-number v-model="form.investmentCommitteePeopleNumber" :placeholder="$t('投委会人数')" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" :precision="0" :max="1000000000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金联系人')" prop="fundContact">
            <el-input v-model="form.fundContact" :placeholder="$t('基金联系人')" maxlength="100" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金联系人电话')" prop="fundContactNumber">
            <el-input v-model="form.fundContactNumber" :placeholder="$t('基金联系人电话')" maxlength="100" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'JBQKBG' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('基金投资信息') }}</span>
          </div>
        </el-col>

        <el-col :span="12">
          <el-form-item :label="$t('基金总规模') + $t('金额单位')" prop="totalFundSize">
            <Money v-model="form.totalFundSize" :placeholder="$t('基金总规模')" unit="w" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('主要投向')" prop="mainInvestment">
            <el-input v-model="form.mainInvestment" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('主要投向')" maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('已投出资本总额') + $t('金额单位')" prop="totalInvestedCapital">
            <Money v-model="form.totalInvestedCapital" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('已投出资本总额')" unit="w" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('现存项目数量')" prop="existingProjectsNumber">
            <el-input-number v-model="form.existingProjectsNumber" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('现存项目数量')" :precision="0" :max="1000000000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('我方收到分红') + $t('金额单位')" prop="receiveDividends">
            <Money v-model="form.receiveDividends" :placeholder="$t('我方收到分红')" unit="w" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'SDFH' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金估值') + $t('金额单位')" prop="fundValuation">
            <Money v-model="form.fundValuation" :placeholder="$t('基金估值')" unit="w" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金估值时间')" prop="fundValuationTime">
            <el-date-picker
              v-model="form.fundValuationTime"
              clearable
              style="width: 200px"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('基金估值时间')"
              :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item :label="$t('备注')" prop="remark">
            <el-input v-model="form.remark" type="textarea" :placeholder="$t('备注')" maxlength="1000" />
          </el-form-item>
        </el-col>
      </el-row>

      <!--投资标的信息-->
      <div class="area-header">
        <span class="area-header-title">{{ $t('投资标的信息') }}</span>
      </div>
      <el-table :data="form.propertyFundDealList" border class="nowrapTable formTable">
        <el-table-column :label="$t('序号')" align="center" width="50">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('序号') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item
              type="index"
              :prop="'propertyFundDealList.' + scope.$index + '.serialNumber'"
            >
              {{ scope.$index + 1 }}
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('项目名称')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('项目名称') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.dealName'" :rules="propertyFundDealListRules.dealName">
              <el-input v-model="scope.row.dealName" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('项目名称')" maxlength="100" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('所属行业')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('所属行业') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.industry'" :rules="propertyFundDealListRules.industry">
              <el-input v-model="scope.row.industry" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('所属行业')" maxlength="100" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('投资时间')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('投资时间') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.investmentTime'" :rules="propertyFundDealListRules.investmentTime">
              <el-date-picker
                v-model="scope.row.investmentTime"
                clearable
                style="width: 200px"
                type="date"
                value-format="yyyy-MM-dd"
                :placeholder="$t('投资时间')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>

        <el-table-column :label="$t('投资额') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('投资额') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.investmentAmount'" :rules="propertyFundDealListRules.investmentAmount">
              <Money v-model="scope.row.investmentAmount" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('投资额') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('分红时间')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('分红时间') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.dividendTime'" :rules="propertyFundDealListRules.dividendTime">
              <el-date-picker
                v-model="scope.row.dividendTime"
                clearable
                style="width: 200px"
                type="date"
                value-format="yyyy-MM-dd"
                :placeholder="$t('分红时间')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('分红金额') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('分红金额') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.dividendAmount'" :rules="propertyFundDealListRules.dividendAmount">
              <Money v-model="scope.row.dividendAmount" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('分红金额') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('股权比例(%)')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('股权比例(%)') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.equityRatio'" :rules="propertyFundDealListRules.equityRatio">
              <Ratio
                v-model="scope.row.equityRatio"
                :precision="4"
                :controls="false"
                :min="0"
                :max="100"
                :placeholder="$t('股权比例(%)')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('营业收入') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('营业收入') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.operatingIncome'" :rules="propertyFundDealListRules.operatingIncome">
              <Money v-model="scope.row.operatingIncome" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('营业收入') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('净利润') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('净利润') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.netIncome'" :rules="propertyFundDealListRules.netIncome">
              <Money v-model="scope.row.netIncome" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('净利润') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('总资产') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('总资产') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.totalAssets'" :rules="propertyFundDealListRules.totalAssets">
              <Money v-model="scope.row.totalAssets" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('总资产') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('净资产') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('净资产') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.netAssets'" :rules="propertyFundDealListRules.netAssets">
              <Money v-model="scope.row.netAssets" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('净资产') + $t('金额单位')" unit="w" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('是否约定最低收益率')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('是否约定最低收益率') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.agreedMinimumYield'" :rules="propertyFundDealListRules.agreedMinimumYield">
              <el-radio-group v-model="scope.row.agreedMinimumYield" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'">
                <el-radio
                  v-for="dict in agreedMinimumYieldOptions"
                  :key="dict.dictValue"
                  :label="dict.dictValue"
                  :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
                >{{ $t(dict.dictLabel) }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('最低收益率(%)')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('最低收益率(%)') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.minimumYield'" :rules="propertyFundDealListRules.minimumYield">
              <Ratio
                v-model="scope.row.minimumYield"
                :precision="4"
                :controls="false"
                :min="0"
                :max="100"
                :placeholder="$t('最低收益率(%)')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('投资收益率(%)')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('投资收益率(%)') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.investmentReturn'" :rules="propertyFundDealListRules.investmentReturn">
              <Ratio
                v-model="scope.row.investmentReturn"
                :precision="4"
                :controls="false"
                :min="0"
                :max="100"
                :placeholder="$t('投资收益率(%)')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('币种')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('币种') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.currency'">
              <dictSelect
                v-model="scope.row.currency"
                size="small"
                :clearable="true"
                dictionary="currency"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('备注')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('备注') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundDealList.' + scope.$index + '.remark'" :rules="propertyFundDealListRules.remark">
              <el-input v-model="scope.row.remark" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('备注')" maxlength="2000" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column v-if="!otherBtnHide && form.last !== 'N'" :label="$t('操作')" align="center" width="60px" fixed="right">
          <template slot-scope="scope">
            <el-button v-hasPermi="['fund:property:remove']" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" size="small" type="text" icon="el-icon-delete" @click="delPropertyFundDealHandle(scope.$index, scope.row)" />
          </template>
        </el-table-column>
      </el-table>
      <div v-if="!otherBtnHide && form.last !== 'N'" class="tol">
        <el-button v-hasPermi="['fund:property:edit']" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'QTBD'" type="primary" icon="el-icon-plus" size="mini" @click="addPropertyFundDeal">{{ $t('添加') }}</el-button>
      </div>

      <!--合伙人信息 -->
      <div class="area-header">
        <span class="area-header-title">{{ $t('合伙人信息 ') }}</span>
      </div>
      <el-table :data="form.propertyFundLpList" border class="nowrapTable formTable">

        <el-table-column :label="$t('序号')" align="center" width="50">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('序号') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item
              type="index"
              :prop="'propertyFundLpList.' + scope.$index + '.serialNumber'"
            >
              {{ scope.$index + 1 }}
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('出资人来源')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('出资人来源') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.investorSource'" :rules="propertyFundLpListRules.investorSource">
              <dictSelect
                v-model="scope.row.investorSource"
                size="small"
                :clearable="true"
                dictionary="source_investor"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'"
                @change="investorSource(scope.row)"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('出资人名称')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('出资人名称') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.investorId'" :rules="propertyFundLpListRules.investorId">
              <el-input v-if="scope.row.investorSource !== 'JTNBGS'" v-model="scope.row.investorId" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" :placeholder="$t('出资人名称')" maxlength="100" />
              <el-select v-if="scope.row.investorSource === 'JTNBGS'" v-model="scope.row.investorId" :placeholder="$t('出资人名称')" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" filterable clearable>
                <el-option
                  v-for="item in propertyCompanyOptions"
                  :key="item.id"
                  :label="$t(item.companyId)"
                  :value="item.id"
                  :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'"
                />
              </el-select>
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('合伙人性质')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('合伙人性质') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.partnerNature'" :rules="propertyFundLpListRules.partnerNature">
              <dictSelect
                v-model="scope.row.partnerNature"
                size="small"
                :clearable="true"
                dictionary="partner_type"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>

        <el-table-column :label="$t('认缴资本') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('认缴资本') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.subscribedCapital'" :rules="propertyFundLpListRules.subscribedCapital">
              <Money v-model="scope.row.subscribedCapital" :placeholder="$t('认缴资本') + $t('金额单位')" unit="w" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('实到资本') + $t('金额单位')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('实到资本') + $t('金额单位') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.realCapital'" :rules="propertyFundLpListRules.realCapital">
              <Money v-model="scope.row.realCapital" :placeholder="$t('实到资本') + $t('金额单位')" unit="w" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('出资比例(%)')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <i style="color: #ff4949;margin-right: 4px;">*</i>
            <span>{{ $t('出资比例(%)') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.fundedRatio'" :rules="propertyFundLpListRules.fundedRatio">
              <Ratio
                v-model="scope.row.fundedRatio"
                :precision="4"
                :controls="false"
                :min="0"
                :max="100"
                :placeholder="$t('出资比例(%)')"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('币种')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('币种') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.currency'" :rules="propertyFundLpListRules.currency">
              <dictSelect
                v-model="scope.row.currency"
                :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'"
                size="small"
                :clearable="true"
                dictionary="currency"
              />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column :label="$t('备注')" align="center" width="170">
          <template slot="header" slot-scope="{}">
            <span>{{ $t('备注') }}</span>
          </template>
          <template slot-scope="scope">
            <el-form-item :prop="'propertyFundLpList.' + scope.$index + '.remark'" :rules="propertyFundLpListRules.remark">
              <el-input v-model="scope.row.remark" :placeholder="$t('备注')" maxlength="2000" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" />
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column v-if="!otherBtnHide && form.last !== 'N'" :label="$t('操作')" align="center" width="60px" fixed="right">
          <template slot-scope="scope">
            <el-button v-hasPermi="['fund:property:remove']" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" size="small" type="text" icon="el-icon-delete" @click="delPropertyFundLpHandle(scope.$index, scope.row)" />
          </template>
        </el-table-column>
      </el-table>
      <div v-if="!otherBtnHide && form.last !== 'N'" class="tol">
        <el-button v-hasPermi="['fund:property:edit']" :disabled="form.actStatus === 'W' && form.levelTwoRegistrationType !== 'RJZBZJ' && form.levelTwoRegistrationType !== 'RJZBJS' && form.levelTwoRegistrationType !== 'JJFEHZ' && form.levelTwoRegistrationType !== 'SJZBZJ' && form.levelTwoRegistrationType !== 'TZBD' && form.levelTwoRegistrationType !== 'QTBD'" type="primary" icon="el-icon-plus" size="mini" @click="addPropertyFundLp">{{ $t('添加') }}</el-button>
      </div>

      <!-- 附件列表 -->
      <FileTable v-if="form.last !== 'N'" has-permi="fund:property" :list.sync="form.fileList" data-type="property_fund" :btn-show="!otherBtnHide" />
    </el-form>
    <div v-if="form.last !== 'N'" slot="footer" class="dialog-footer" style="text-align: right;">
      <!--保存 取消按钮-->
      <el-button v-if="form.actStatus !== 'D'" @click="cancel()">{{ $t("取消") }}</el-button>
      <!--      <el-button v-if="menuKey" type="info" @click="showImage">{{ $t('查看流程') }}</el-button>-->
      <el-button
        v-if="form.actStatus !== 'D' "
        v-hasPermi="['fund:property:edit']"
        :disabled="isDisable"
        type="primary"
        @click="submitForm('save')"
      >{{ $t("保存") }}
      </el-button>
      <el-button
        v-if="form.actStatus !== 'D'"
        v-hasPermi="['fund:property:edit']"
        :disabled="isDisable"
        type="primary"
        @click="submitForm('process')"
      >{{ $t("保存并启动流程") }}
      </el-button>

      <!--      <FormBtn ref="formBtn" has-permi="fund:property" :bus-data="form" :btn-hide="btnHide" />-->
    </div>
  </div>
</template>

<script>
import {
  savePropertyFund,
  getPropertyFund,
  delPropertyFundDeal,
  delPropertyFundLp,
  listPropertyCompany
} from '@/api/fund/property/propertyFund'
import { findGp } from '@/api/fund/gp/gpBase'
import { findFund, getFundBase } from '@/api/fund/fundBase'
    export default {
        data() {
            return {
                // 表单参数
                form: {
                  propertyFundDealList: [],
                  propertyFundLpList: []
                },
                levelOneRegistrationTypeOptions: [],
                getTypeOneChange: [],
                agreedMinimumYieldOptions: [],
                propertyCompanyOptions: [],
                yesNoOptions: [],
                // 基金管理人
                gpBaseOptions: [],
                // 基金列表
                fundOptions: [],
                // 遮罩层
                loading: false,
                // 表单校验
                rules: {
                  levelOneRegistrationType: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  levelTwoRegistrationType: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  fundId: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  fundAbbreviation: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  fundType: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  establishTime: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  duration: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  detailsRegistered: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  fundManagementCompany: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  managementCompanyRatio: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  managementAmountRatio: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  groupDischargePeopleNumber: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  chairman: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  actuallyManaged: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  investmentCommitteePeopleNumber: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  eventDate: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  propertyRegistrationDate: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }]
                },
                propertyFundDealListRules: {
                  dealName: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  industry: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  investmentTime: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  investmentAmount: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }]
                },
                propertyFundLpListRules: {
                  investorSource: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  investorId: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  partnerNature: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  subscribedCapital: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  realCapital: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }],
                  fundedRatio: [{ required: true, message: this.$t('必填信息'), trigger: 'blur' }]
                },
              // 是否隐藏保存按钮 (流程中需要增加)
              btnHide: false,
              // 是否隐藏其它按钮 (流程中需要增加)
              otherBtnHide: false,
              // 是否禁用保存按钮 防止重复提交
              isDisable: false
            }
        },
        created() {
            this.getDicts('fund_registration_type').then(response => {
                this.levelOneRegistrationTypeOptions = response.data
            })
            this.getDicts('property_fund_type').then(response => {
                this.fundTypeOptions = response.data
            })
            this.getDicts('sys_yes_no').then(response => {
              this.agreedMinimumYieldOptions = response.data
              this.yesNoOptions = response.data
            })
            // 查询基金管理人
            this.findGpOption()
            listPropertyCompany({}).then(response => {
              this.propertyCompanyOptions = response.rows
            })
            // 查询基金列表
            findFund({}).then(response => {
              this.fundOptions = response.data
            })
        },
        mounted() {
          this.$bus.$emit('async_done')
        },
        methods: {
            // 初始化数据
            init(data) {
                this.loading = true
                if (data != null && data.id !== undefined) {
                    getPropertyFund(data.id).then(response => {
                        this.form = response.data
                        if (this.form.actStatus === 'W') {
                          this.form.levelOneRegistrationType = 'CQBG'
                          this.form.levelTwoRegistrationType = undefined
                        }
                        this.typeOneChange(this.form.levelOneRegistrationType, false)
                        this.form.eventDate = new Date()
                        this.form.propertyRegistrationDate = new Date()
                        this.form.descriptionRemarks = undefined
                        this.loading = false
                    }).catch(() => {
                      this.loading = false
                    })
                } else {
                    this.reset()
                    this.form.levelOneRegistrationType = 'ZYDJ'
                    this.typeOneChange(this.form.levelOneRegistrationType, false)
                    this.loading = false
                }
            },
            // 表单重置
            reset() {
                this.form = {
                    id: undefined,
                    levelOneRegistrationType: undefined,
                    levelTwoRegistrationType: undefined,
                    changeInformation: undefined,
                    fundId: undefined,
                    fundName: undefined,
                    fundAbbreviation: undefined,
                    fundType: undefined,
                    establishTime: undefined,
                    duration: undefined,
                    detailsRegistered: undefined,
                    fundManagementCompany: undefined,
                    managementCompanyRatio: undefined,
                    managementAmountRatio: undefined,
                    groupDischargePeopleNumber: undefined,
                    chairman: undefined,
                    actuallyManaged: undefined,
                    investmentCommitteePeopleNumber: undefined,
                    fundContact: undefined,
                    fundContactNumber: undefined,
                    eventDate: new Date(),
                    propertyRegistrationDate: new Date(),
                    descriptionRemarks: undefined,
                    totalFundSize: undefined,
                    mainInvestment: undefined,
                    totalInvestedCapital: undefined,
                    existingProjectsNumber: undefined,
                    receiveDividends: undefined,
                    fundValuation: undefined,
                    fundValuationTime: undefined,
                    remark: undefined,
                    createBy: undefined,
                    createTime: undefined,
                    updateBy: undefined,
                    updateTime: undefined,
                    delFlag: undefined
                }
                this.resetForm('form')
            },
          typeOneChange(typeOne, clearTwo) {
            if (clearTwo) {
              this.form.levelTwoRegistrationType = undefined
            }
            this.getTypeOneChange = []
            this.getDicts('fund_registration_type').then(response => {
              this.levelOneRegistrationTypeOptions = response.data
              const object = this.levelOneRegistrationTypeOptions.find(obj => obj.dictValue === typeOne)
              var typeOneChildren
              if (object) {
                typeOneChildren = object.childDict
              }
              if (typeOneChildren !== undefined && typeOneChildren !== null && typeOneChildren !== '') {
                this.getDicts(typeOneChildren).then(response => {
                  this.getTypeOneChange = response.data
                })
              }
            })
          },
            // 查询基金管理人
            findGpOption() {
              findGp().then(response => {
                this.gpBaseOptions = response.data
              })
            },
            // 取消按钮
            cancel() {
                this.$parent.$parent.formOpen = false
                this.$parent.$parent.propertyFundFormOpen = false
                this.$parent.$parent.reset()
            },
            // 关闭form页面
            closeForm() {
                // 关闭form页面遮罩层
                this.loading = false
                // 关闭form页面
                if (this.$parent.$parent.formOpen !== undefined) {
                  this.$parent.$parent.formOpen = false
                }
                // 刷新list页面
                if (this.$parent.$parent.getList !== undefined) {
                  this.$parent.$parent.getList()
                }
            },
            /** 提交按钮 */
            // type 保存:save   保存并启动流程:process
            submitForm: function(type) {
              // 流程需要增加
              return new Promise((resolve, reject) => {
                this.$refs['form'].validate(valid => {
                    if (valid) {
                        this.loading = true
                        // 保存数据
                        savePropertyFund(this.form).then(response => {
                            if (response.code === 200) {
                              if (type === 'process') {
                                // 设置数据id方式启动流程后取消并再次启动会创建多条记录
                                this.form.id = response.data
                                // 启动流程
                                this.startProcess(response.data)
                              } else {
                                this.msgSuccess(this.$t('保存成功'))
                                this.closeForm()
                              }
                              resolve()
                            } else {
                              this.msgError(response.msg)
                              this.loading = false
                              reject()
                            }
                        }).catch(() => {
                          this.loading = false
                        })
                    } else {
                      reject()
                      this.locationError(document)
                    }
                })
              })
            },
          // 启动流程
          startProcess: function(data) {
            this.loading = false
            // 启动流程时候传入的参数
            const processData = {}
            // 待办标题
            processData.title = '[' + data.fundName + '] 基金产权'
            // 业务表名
            processData.dataTable = 'property_fund'
            // 业务ID 根据 业务表名 和 业务ID 俩个字段来更新流程的审批状态和流程实例ID
            processData.dataId = data.id
            // 业务表单地址 待办时查看的页面
            processData.formPath = '@/views/fund/property/propertyFundForm'
            // 菜单标识(根据菜单标识判断的走哪个流程)
            processData.menuKey = 'property_fund'
            this.startProcessByMenu(processData, () => {
              this.form.actStatus = 'D'
              this.msgSuccess(this.$t('数据保存成功,流程启动成功'))
              this.closeForm()
            })
          },
          addPropertyFundDeal() {
            const row = {
              id: undefined,
              dealName: '',
              industry: '',
              investmentTime: '',
              investmentAmount: '',
              dividendTime: '',
              dividendAmount: '',
              equityRatio: '',
              operatingIncome: '',
              netIncome: '',
              totalAssets: '',
              netAssets: '',
              agreedMinimumYield: '',
              minimumYield: '',
              investmentReturn: '',
              currency: '',
              remark: ''
            }
            if (!(this.form.propertyFundDealList instanceof Array)) {
              this.$set(this.form, 'propertyFundDealList', [])
            }
            this.$nextTick(() => {
              this.form.propertyFundDealList.push(row)
            })
          },
          delPropertyFundDealHandle(index, row) {
            const id = row.id
            if (id !== undefined && id !== '' && id != null) {
              this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
                confirmButtonText: this.$t('确定'),
                cancelButtonText: this.$t('取消'),
                type: 'warning'
              })
                .then(function() {
                  return delPropertyFundDeal(id)
                }).then(() => {
                this.form.propertyFundDealList.splice(index, 1)
                return this.msgSuccess(this.$t('删除成功'))
              })
                .catch(function() {})
            } else {
              this.form.propertyFundDealList.splice(index, 1)
            }
          },
          addPropertyFundLp() {
            const row = {
              id: undefined,
              investorSource: '',
              investorId: '',
              partnerNature: '',
              subscribedCapital: '',
              realCapital: '',
              fundedRatio: '',
              currency: '',
              remark: ''
            }
            if (!(this.form.propertyFundLpList instanceof Array)) {
              this.$set(this.form, 'propertyFundLpList', [])
            }
            this.$nextTick(() => {
              this.form.propertyFundLpList.push(row)
            })
          },
          delPropertyFundLpHandle(index, row) {
            const id = row.id
            if (id !== undefined && id !== '' && id != null) {
              this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
                confirmButtonText: this.$t('确定'),
                cancelButtonText: this.$t('取消'),
                type: 'warning'
              })
                .then(function() {
                  return delPropertyFundLp(id)
                }).then(() => {
                this.form.propertyFundLpList.splice(index, 1)
                return this.msgSuccess(this.$t('删除成功'))
              })
                .catch(function() {})
            } else {
              this.form.propertyFundLpList.splice(index, 1)
            }
          },
          investorSource(row) {
              row.investorId = undefined
          },
          queryFundInfo(fundId) {
            if (fundId) {
              getFundBase(fundId).then(res => {
                if (res.data) {
                  this.form.fundAbbreviation = res.data.fundName
                  this.form.establishTime = res.data.foundationDate
                  this.form.duration = res.data.fundBaseFund.durationContract
                  this.form.detailsRegistered = res.data.registeredAddress
                }
              })
            }
          }
        }
    }
</script>
